<template>
	<view class="go-top" @click="gotop">
		<uni-icons type="arrow-up" color="#888" size="30"></uni-icons>
	</view>
</template>

<script>
	export default {
		name:"xz-go-top",
		data() {
			return {
				
			};
		},
		methods: {
			gotop() {
				uni.pageScrollTo({
					scrollTop:0,
					duration:200
				})
			}
		},
	}
</script>

<style lang="scss">
	.go-top{
		position: fixed;
		right: 10rpx;
		bottom: 160rpx;
		border: 1px solid #888;
		background-color: #fff;
		border-radius: 50%;
		opacity: 0.8;
		&:active{
			opacity: 1;
		}
	}
</style>